package com.ttg.controller;

//~--- non-JDK imports --------------------------------------------------------

import com.ttg.config.Properties;
import com.ttg.data.InitGatewayReqData;
import com.ttg.pojo.QueryAccountBalanceReqDTO;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

//~--- classes ----------------------------------------------------------------

/**
 * Class GwQueryBalanceDemoController
 * Description 说明：余额查询接口测试DEMO
 * Create 2016-08-09 13:37:22
 * @author Ardy
 */
@Controller
@RequestMapping
public class GwQueryBalanceDemoController {

    /**
     * Field LOGGER
     * Description
     */
    private static final Logger LOGGER = LoggerFactory.getLogger(GwQueryBalanceDemoController.class);

    /**
     * Method testQueryBalanceDemo
     * Description 说明：查询余额接口
     *
     * @return 返回值说明：
     */
    @RequestMapping("/query_balance")
    public ModelAndView testQueryBalanceDemo() {
        QueryAccountBalanceReqDTO queryBalance = InitGatewayReqData.initQueryBalance();
        ModelAndView              modelAndView = new ModelAndView();
        String                    url          = Properties.URL.getString("GATEWAY_BASE_SCHEME")
                                                 + Properties.URL.getString("QUERY_BALANCE_URL");

        modelAndView.addObject("url", url);
        modelAndView.setViewName("req/query_balance_demo");
        modelAndView.addObject("queryBalance", queryBalance);

        return modelAndView;
    }
}


//~ Formatted by Jindent --- http://www.jindent.com
